package aspectos;

import java.util.HashMap;
import annotations.Monitored;

public aspect ContadorLlamadasAspect pertarget(withincode(@Monitored * dominio.*.*(..))){
	
	private HashMap<String, Integer> cants = new HashMap<String, Integer>();
	
	pointcut executing(Object target) : 
		execution(@Monitored * dominio.*.*(..)) && target(target);
	
	Object around(Object target) : executing(target) {
		
	}
	
	//**********************************************************************/
	
	public Integer cantLlamadas(String method) {
		return cants.get(method);
	}
	
}
